package cn.wolfcode.wolf2world.repository;

import cn.wolfcode.wolf2world.domain.Travel;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * @author 杨兴健
 * @Date 2020-08-14 12:55
 */
public interface TravelRepository extends MongoRepository<Travel,String> {
    /**
     * 目的地相关的浏览量前三的游记
     * @param destId
     * @param pageable
     * @return
     */
    List<Travel> findByDestId(String destId, Pageable pageable);

    /**
     * 根据目的地名称查询游记
     * @param destName
     * @return
     */
    List<Travel> findByDestName(String destName);
}
